package com.pai4j.common.util;

import java.util.Random;

/**
 *  头像地址工具类
 *
 * @author: CYM-pai
 * @date: 2025/04/17 11:10
 **/

public class AvatarUtil {

    /**
     * 头像地址前缀
     */
    private static final String PHOTO_PREFIX = "/images/avatar/photo/%s.png";

    /**
     * 随机获取一个头像
     *
     * @return
     */
    public static String getRandomAvatar() {
        int name = new Random().nextInt(13) + 1;
        return String.format(PHOTO_PREFIX, name);
    }
    
    public static void main(String[] args) {
        System.out.println(getRandomAvatar());
    }
}
